package com.hxtec.polaris.service;

import com.hxtec.polaris.commons.dto.ExpressDto;
import com.hxtec.polaris.commons.dto.OmsOrderDeliveryParam;
import com.hxtec.polaris.entity.ShopExpressCompany;
import com.hxtec.polaris.entity.ShopLogisticCompany;
import com.hxtec.polaris.entity.ShopOrderHistory;

import java.util.List;
import java.util.Map;

/**
 * @Author yonyong
 * @Description //订单管理相关
 * @Date 2019/12/26 16:02
 * @Param
 * @return
 **/
public interface OrderManagerService {
    /**
     * 获取订单信息
     * @param pageNum
     * @param pageSize
     * @param orderSn
     * @param receiverKeyword
     * @param status
     * @param updateTime
     * @return
     */
    Object list(int pageNum, int pageSize, String orderSn, String receiverKeyword, String status, String updateTime);

    /**
     * 获取订单详情
     * @param id
     * @return
     */
    Map<String,Object> getDetail(int id);

    /**
     * 关闭订单
     * @param ids
     * @param note
     * @return
     */
    String closeOrder(String[] ids, String note);

    /**
     * 批量发货
     * @param deliveryParamList
     * @return
     */
    int delivery(List<OmsOrderDeliveryParam> deliveryParamList);

    /**
     * 修改收货人信息
     * @param id
     * @param name
     * @param phone
     * @param postcode
     * @param detail
     * @return
     */
    int receiverInfo(int id, String name, String phone, String postcode, String detail);

    /**
     * 获取快递信息
     * @param company
     * @param code
     * @return
     */
    List<ExpressDto> getExpressInfo(String company, String code);

    /**
     * 添加订单操作历史记录
     * @param orderId
     * @param operator
     * @param order_state
     * @param note
     */
    void  addOrderRecord(int orderId,String operator,int order_state,String note);

    /**
     * 获取物流公司信息
     * @return
     */
    List<ShopLogisticCompany> getLogistic();

    /**
     * 更新物流公司信息
     * @param shopLogisticCompany
     * @return
     */
    int updateLogistic(ShopLogisticCompany shopLogisticCompany);

    /**
     * 添加物流公司信息
     * @param shopLogisticCompany
     * @return
     */
    int addLogistic(ShopLogisticCompany shopLogisticCompany);

    /**
     * 删除物流公司信息
     * @param shopLogisticCompany
     * @return
     */
    int deleteLogistic(ShopLogisticCompany shopLogisticCompany);

    /**
     * 获取name相关的快递厂家
     * @param name
     * @return
     */
    List<ShopExpressCompany> selectLogistic(String name);
}
